package com.ruoyi.factorydata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.factorydata.domain.InventoryReceiptModelDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 母版入库单详情Mapper接口
 *
 * @author ruoyi
 * @date 2025-07-26
 */
public interface InventoryReceiptModelDetailMapper extends BaseMapper<InventoryReceiptModelDetail> {
    /**
     * 查询母版入库单详情
     *
     * @param id 母版入库单详情主键
     * @return 母版入库单详情
     */
    public InventoryReceiptModelDetail selectInventoryReceiptModelDetailById(Long id);

    /**
     * 查询母版入库单详情列表
     *
     * @param inventoryReceiptModelDetail 母版入库单详情
     * @return 母版入库单详情集合
     */
    public List<InventoryReceiptModelDetail> selectInventoryReceiptModelDetailList(InventoryReceiptModelDetail inventoryReceiptModelDetail);

    /**
     * 新增母版入库单详情
     *
     * @param inventoryReceiptModelDetail 母版入库单详情
     * @return 结果
     */
    public int insertInventoryReceiptModelDetail(InventoryReceiptModelDetail inventoryReceiptModelDetail);

    /**
     * 修改母版入库单详情
     *
     * @param inventoryReceiptModelDetail 母版入库单详情
     * @return 结果
     */
    public int updateInventoryReceiptModelDetail(InventoryReceiptModelDetail inventoryReceiptModelDetail);

    /**
     * 删除母版入库单详情
     *
     * @param id 母版入库单详情主键
     * @return 结果
     */
    public int deleteInventoryReceiptModelDetailById(Long id);

    /**
     * 批量删除母版入库单详情
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInventoryReceiptModelDetailByIds(Long[] ids);

    /**
     * 获取入库单的预计入库数量
     *
     * @param receiptId 入库单id
     * @return 预计入库数量
     */
    Long getExpectedQuantityTotal(@Param("receiptId") Long receiptId);
}